//
//  EeNavigationOwner.swift
//  soapp
//
//  Created by zhu xietong on 2017/10/18.
//

import Foundation
//
//  File.swift
//  soapp
//
//  Created by zhu xietong on 2017/10/18.
//

import Foundation
import UIKit
class EeTopNavigationDelegate: NSObject, UINavigationControllerDelegate {
    static var duration:TimeInterval = 0.35
    static var animationCurve:UIView.AnimationCurve = UIView.AnimationCurve(rawValue: 7)!
    
    var timestamp: Date?
    
    func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) {
        if let transitionCoordinator = viewController.transitionCoordinator {
            EeTopNavigationDelegate.duration = transitionCoordinator.transitionDuration
            EeTopNavigationDelegate.animationCurve = transitionCoordinator.completionCurve
            
//            debugPrint("====== duration = \(transitionCoordinator.transitionDuration); coordinator type \(transitionCoordinator.completionCurve.rawValue)")
        } else {
            debugPrint("No transition coordinator set")
        }
    }
    
    
    
    
}
